package com.trkj.vo;

import java.text.SimpleDateFormat;

public class MyProcessesVo implements Comparable<MyProcessesVo>{
	private String my_processID;// 流程编号
	private String my_processName;// 流程名称
	private String my_processState;// 流程状态
	private String my_processStartTime;// 流程发起时间
	private String my_taskName;// 当前任务
	private String my_processEndTime;// 流程结束时间
	private String my_taskId;// 流程结束时间

	
	public String getMy_taskId() {
		return my_taskId;
	}

	public void setMy_taskId(String my_taskId) {
		this.my_taskId = my_taskId;
	}

	public String getMy_processID() {
		return my_processID;
	}

	public void setMy_processID(String my_processID) {
		this.my_processID = my_processID;
	}

	public String getMy_processName() {
		return my_processName;
	}

	public void setMy_processName(String my_processName) {
		this.my_processName = my_processName;
	}

	public String getMy_processState() {
		return my_processState;
	}

	public void setMy_processState(String my_processState) {
		this.my_processState = my_processState;
	}

	public String getMy_processStartTime() {
		return my_processStartTime;
	}

	public void setMy_processStartTime(String my_processStartTime) {
		this.my_processStartTime = my_processStartTime;
	}

	public String getMy_taskName() {
		return my_taskName;
	}

	public void setMy_taskName(String my_taskName) {
		this.my_taskName = my_taskName;
	}

	public String getMy_processEndTime() {
		return my_processEndTime;
	}

	public void setMy_processEndTime(String my_processEndTime) {
		this.my_processEndTime = my_processEndTime;
	}

	@Override
	public String toString() {
		return "MyProcessesVo [my_processID=" + my_processID + ", my_processName=" + my_processName
				+ ", my_processState=" + my_processState + ", my_processStartTime=" + my_processStartTime
				+ ", my_taskName=" + my_taskName + ", my_processEndTime=" + my_processEndTime + ", my_taskId="
				+ my_taskId + "]";
	}
	@Override
	public int compareTo(MyProcessesVo o) {
		SimpleDateFormat sf = new SimpleDateFormat("yyyy-MM-dd");
		long one=Long.valueOf(this.getMy_processID());
		long two=Long.valueOf(o.getMy_processID());
		try {
			if (this.getMy_processStartTime()!=null) {
				one = sf.parse(this.getMy_processStartTime()).getTime();
			}
			if(o.getMy_processStartTime()!=null){
				two = sf.parse(o.getMy_processStartTime()).getTime();
			}
		} catch (Exception e) {
			e.printStackTrace();
		}
		return (one < two ? 1 :(one == two ? 0 : -1));  
	}
	

}
